/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package koor.entity;
import javax.persistence.*;

/**
 *
 * @author Admin
 */
@Entity
@Table(name = "subject")
public class Subject extends AbstractEntity{
    
    @Column(name = "title")
    private String title;
    
    @ManyToOne
    @JoinColumn(name = "department_id", referencedColumnName = "id")
    private Department department; 

    public Subject() {
    }

    public Subject(String title) {
        this.title = title;
    }

    public Subject(String title, int id) {
        super(id);
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

}
